package com.shouer.doc.widget;

import android.content.Context;
import android.util.AttributeSet;

import com.jcodecraeer.xrecyclerview.XRecyclerView;

/**
 * Created by ZXL on 2016/12/19.
 */

public class ShouerListView extends XRecyclerView {

    private double flingScale=1;               //抛掷速度的缩放因子

    public ShouerListView(Context context) {
        super(context);
    }

    public ShouerListView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public ShouerListView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public boolean fling(int velocityX, int velocityY) {
        velocityX *= flingScale;
        return super.fling(velocityX, velocityY);
    }

    public void setFlingScale(double flingScale) {
        this.flingScale = flingScale;
    }
}
